﻿/*
 * ============ [ 废土 ] ============
 *
 * [ 维护者 ]  argoran@gmail.com
 * [  状态  ]  原型
 *
 * ============ [ 注释 ] ============
 *
 * 表示一个与服务器建立了连接的客户端的类
 *
 * ==================================
 */

using System;
using System.Collections.Generic;

using LastLand.Data.Global;

using Up2Link.SegString;
using System.IO;
using System.Text;

namespace LastLand.Data.Connection
{
    public class CConnection
    {
        
        private Int32 status_ = CConst.USER_STATUS_CONNECTED;  //客户端连接状态
        private String account_ = null;                        //客户端连接绑定的账户

        private CMessageSS msg_ = null;

        public Int32 Status
        {
            get { return status_; }
            set { status_ = value; }
        }

        public String Account
        {
            get { return account_; }
            set { account_ = value; }
        }

        public CMessageSS Msg
        {
            get { return msg_; }
            set { msg_ = value; }
        }

        public Boolean IsLoggedIn()
        {
            return status_ != CConst.USER_STATUS_CONNECTED;
        }

        public Boolean IsInGame()
        {
            return status_ == CConst.USER_STATUS_IN_GAME;
        }
    }
}
